<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css" />

<script type="text/javascript">
	function gotoShop(obj) {
		var index = obj.selectedIndex;
		var url = obj.options[index].value;
		if (url) {
			window.location = url;
		}
	}
</script>

</head>

<body>
	<div id="masterContainer">
		<div id="headerContainer">
			<img src="img/shop-logo.jpg" />
			<div id="shopChoice">
				<jsp:include page="shopServlet" />
			</div>
			<hr />
		</div>

		<div id="mainContainer">
			<div id="barContainer">
				<jsp:include page="shoppingCartView.jsp" />
				<jsp:include page="finaliseBuyButton.jsp" />
				<br />

				<%@ page language="java"%>
				<%@ page import="java.lang.String"%>
				<%@ page import="org.jdom.Namespace"%>
				<%
					HttpSession session1 = request.getSession();
					if (session1.getAttribute("authorized") != null) {
						String user = session1.getAttribute("authorized").toString();
						out.println("Welcome <b>" + user.toString() + "</b></br>");
						out.println("<a href=\"admin/adminLogout.jsp\">Logout</a>");					
					} else {
				%>

				<div id="boxContainer">
					<div class='boxHead'>Log In</div>
					<div class='boxContent'>
						<form action="login" method="post">
							Username <input type="text" name="username" /> 
							Password <input	type="password" name="password" /> 
							<input type="submit" value="Login" /> 
							or <a href="register.jsp">register</a> a new account
						</form>
					</div>
				</div>
				<%
					}
				%>

			</div>

			<jsp:include page="itemServlet" />
		</div>


		<hr />
		<div style='float: right; margin-top: 2px;'>
			<a href="statistics.jsp">Statistics</a> <a href="admin/adminPage.jsp">Admin
				Login</a>
		</div>

	</div>
</body>
</html>